//
//  ZBMoBanSixThreeCell.m
//  MoBan
//
//  Created by apple on 16/7/13.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBMoBanSixThreeCell.h"
@interface ZBMoBanSixThreeCell()
@property(nonatomic,strong)UIImageView *imageview;
@property(nonatomic,strong)UILabel *namlelabe;
@property(nonatomic,strong)UILabel *detaillable;
@property(nonatomic,strong)UIImageView *arrowImageview;
@end
@implementation ZBMoBanSixThreeCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self AddUI];
    }
    return self;
}
-(void)AddUI
{
    self.imageview =[[UIImageView alloc]init];
    self.imageview.image = [UIImage imageNamed:@"text.png"];
    [self.contentView addSubview:self.imageview];
    
    self.namlelabe = [[UILabel alloc]init];
    self.namlelabe.text = @"8个好评";
    [self.contentView addSubview:self.namlelabe];
    
    self.detaillable = [[UILabel alloc]init];
    self.detaillable.text =@"共10条评论";
    self.detaillable.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.detaillable];
    
    self.arrowImageview = [[UIImageView alloc]init];
    self.arrowImageview.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.arrowImageview];
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imageview.frame = CGRectMake(10*Kscr, 15*Kscr, 12*Kscr, 12*Kscr);
    
    self.namlelabe.frame  =CGRectMake(self.imageview.right+5*Kscr, 0, 150*Kscr, self.height);
    
    self.detaillable.frame = CGRectMake(self.namlelabe.right, 0, self.width-40*Kscr-self.namlelabe.right, self.height);
    
    self.arrowImageview.frame = CGRectMake(self.width-35*Kscr, 10*Kscr, 8*Kscr, 20*Kscr);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
